CREATE EXTENSION vector;
-- ----------------------------
-- Table structure for ai_knowledge
-- ----------------------------
DROP TABLE IF EXISTS "public"."ai_knowledge";
CREATE TABLE "public"."ai_knowledge" (
                                         "id" BIGSERIAL PRIMARY KEY,
                                         "name" varchar(255) COLLATE "pg_catalog"."default",
                                         "type" varchar(32) COLLATE "pg_catalog"."default",
                                         "description" text COLLATE "pg_catalog"."default",
                                         "create_by" int8,
                                         "update_by" int8,
                                         "create_time" timestamp(6),
                                         "update_time" timestamp(6)
)
;

-- ----------------------------
-- Records of ai_knowledge
-- ----------------------------
BEGIN;
INSERT INTO "public"."ai_knowledge" ("id", "name", "type", "description", "create_by", "update_by", "create_time", "update_time") VALUES (1, '菜谱', 'text', '这是一个菜谱', 1, 1, '2025-07-11 00:19:54.132451', '2025-07-11 00:19:54.132451');
COMMIT;

-- ----------------------------
-- Table structure for ai_knowledge_text
-- ----------------------------
DROP TABLE IF EXISTS "public"."ai_knowledge_text";
CREATE TABLE "public"."ai_knowledge_text" (
                                              "id" BIGSERIAL PRIMARY KEY,
                                              "name" varchar(255) COLLATE "pg_catalog"."default",
                                              "knowledge_id" int8,
                                              "url" varchar(1024) COLLATE "pg_catalog"."default",
                                              "format" text COLLATE "pg_catalog"."default",
                                              "text_status" int4,
                                              "create_by" int8,
                                              "update_by" int8,
                                              "create_time" timestamp(6),
                                              "update_time" timestamp(6)
)
;

-- ----------------------------
-- Records of ai_knowledge_text
-- ----------------------------
BEGIN;
INSERT INTO "public"."ai_knowledge_text" ("id", "name", "knowledge_id", "url", "format", "text_status", "create_by", "update_by", "create_time", "update_time") VALUES (1, '鱼香肉丝', 1, 'http://baidu.com', '["选材与切：选用猪里脊肉，冷冻20分钟后顺纹理切成0.3cm粗的丝（长约8cm），确保口感嫩滑","去腥处：肉丝加水抓洗出血水，挤干后加料酒、盐抓拌至黏性，再加蛋清、淀粉和食用油锁水，腌制10分钟","配菜准备‌:木耳（泡发后切丝）、胡萝卜、青椒、笋丝等，切丝需均匀以保证熟度一致","辅料处理‌：姜蒜末与泡椒碎按2:1:1比例备好，豆瓣酱剁细备用","调制鱼香:黄金比例为：白糖2勺、香醋1.5勺、生抽1勺、老抽半勺、淀粉1勺、清水3勺，糖醋比例为2:1.5，提前调匀避免炒制时手忙脚乱"]', 1, 1, 1, '2025-07-11 00:26:26.99368', '2025-07-11 00:26:26.99368');
COMMIT;

-- ----------------------------
-- Table structure for ai_knowledge_text_embedding
-- ----------------------------
DROP TABLE IF EXISTS "public"."ai_knowledge_text_embedding";
CREATE TABLE "public"."ai_knowledge_text_embedding" (
                                                        "id" BIGSERIAL PRIMARY KEY,
                                                        "name" varchar(255) COLLATE "pg_catalog"."default",
                                                        "text_id" int8,
                                                        "knowledge_id" int8,
                                                        "content" text COLLATE "pg_catalog"."default",
                                                        "embedding" "public"."vector",
                                                        "create_time" timestamp(6)
)
;

-- ----------------------------
-- Records of ai_knowledge_text_embedding
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for ai_knowledge_tu
-- ----------------------------
DROP TABLE IF EXISTS "public"."ai_knowledge_tu";
CREATE TABLE "public"."ai_knowledge_tu" (
                                            "id" BIGSERIAL PRIMARY KEY,
                                            "name" varchar(255) COLLATE "pg_catalog"."default",
                                            "knowledge_id" int8
)
;

-- ----------------------------
-- Records of ai_knowledge_tu
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for ai_spg_entity
-- ----------------------------
DROP TABLE IF EXISTS "public"."ai_spg_entity";
CREATE TABLE "public"."ai_spg_entity" (
                                          "id" BIGSERIAL PRIMARY KEY,
                                          "name" varchar(255) COLLATE "pg_catalog"."default",
                                          "schema_id" int8,
                                          "primary_key" varchar(255) COLLATE "pg_catalog"."default",
                                          "attributes" text COLLATE "pg_catalog"."default",
                                          "description" text COLLATE "pg_catalog"."default",
                                          "create_by" int8,
                                          "update_by" int8,
                                          "create_time" timestamp(6),
                                          "update_time" timestamp(6)
)
;
-- ----------------------------
-- Records of ai_spg_entity
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for ai_spg_relation
-- ----------------------------
DROP TABLE IF EXISTS "public"."ai_spg_relation";
CREATE TABLE "public"."ai_spg_relation" (
                                            "id" BIGSERIAL PRIMARY KEY,
                                            "name" varchar(255) COLLATE "pg_catalog"."default",
                                            "schema_id" int8,
                                            "in_entity" int8,
                                            "out_entity" int8,
                                            "attributes" text COLLATE "pg_catalog"."default",
                                            "description" text COLLATE "pg_catalog"."default",
                                            "create_by" int8,
                                            "update_by" int8,
                                            "create_time" timestamp(6),
                                            "update_time" timestamp(6)
)
;

-- ----------------------------
-- Records of ai_spg_relation
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for ai_spg_schema
-- ----------------------------
DROP TABLE IF EXISTS "public"."ai_spg_schema";
CREATE TABLE "public"."ai_spg_schema" (
                                          "id" BIGSERIAL PRIMARY KEY,
                                          "name" varchar(255) COLLATE "pg_catalog"."default",
                                          "structure" text COLLATE "pg_catalog"."default",
                                          "description" text COLLATE "pg_catalog"."default",
                                          "create_by" int8,
                                          "update_by" int8,
                                          "create_time" timestamp(6),
                                          "update_time" timestamp(6)
)
;

-- ----------------------------
-- Records of ai_spg_schema
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for auth_menu
-- ----------------------------
DROP TABLE IF EXISTS "public"."auth_menu";
CREATE TABLE "public"."auth_menu" (
                                      "name" varchar(255) PRIMARY KEY,
                                      "sup_name" varchar(255) COLLATE "pg_catalog"."default",
                                      "title" varchar(255) COLLATE "pg_catalog"."default",
                                      "icon" varchar(255) COLLATE "pg_catalog"."default",
                                      "create_time" timestamp(6),
                                      "update_time" timestamp(6)
)
;

-- ----------------------------
-- Records of auth_menu
-- ----------------------------
BEGIN;
INSERT INTO "public"."auth_menu" ("name", "sup_name", "title", "icon", "create_time", "update_time") VALUES ('admin-system-role', 'admin-system', '角色管理', 'mdi:account-multiple', '2025-07-27 21:13:52', '2025-07-27 21:13:54');
INSERT INTO "public"."auth_menu" ("name", "sup_name", "title", "icon", "create_time", "update_time") VALUES ('admin-system-menu', 'admin-system', '菜单管理', 'mdi:menu', '2025-07-27 21:13:52', '2025-07-27 21:13:54');
INSERT INTO "public"."auth_menu" ("name", "sup_name", "title", "icon", "create_time", "update_time") VALUES ('admin-system', NULL, '系统管理', 'ep:setting', '2025-07-27 21:13:52', '2025-07-27 21:13:54');
INSERT INTO "public"."auth_menu" ("name", "sup_name", "title", "icon", "create_time", "update_time") VALUES ('admin-system-user', 'admin-system', '用户管理', 'ep:user', '2025-07-27 21:13:52', '2025-07-27 21:13:54');
INSERT INTO "public"."auth_menu" ("name", "sup_name", "title", "icon", "create_time", "update_time") VALUES ('admin-content-document', 'admin-content', '文档管理', 'ep:user', '2025-07-27 21:13:52', '2025-07-27 21:13:52');
INSERT INTO "public"."auth_menu" ("name", "sup_name", "title", "icon", "create_time", "update_time") VALUES ('admin-content', NULL, '内容管理', 'ep:setting', '2025-07-27 21:13:52', '2025-07-27 21:13:52');
COMMIT;

-- ----------------------------
-- Table structure for auth_permission
-- ----------------------------
DROP TABLE IF EXISTS "public"."auth_permission";
CREATE TABLE "public"."auth_permission" (
                                            "mark" varchar(255) PRIMARY KEY,
                                            "name" varchar(255) COLLATE "pg_catalog"."default",
                                            "menu_id" int8,
                                            "create_time" timestamp(6),
                                            "update_time" timestamp(6)
)
;

-- ----------------------------
-- Records of auth_permission
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for auth_role
-- ----------------------------
DROP TABLE IF EXISTS "public"."auth_role";
CREATE TABLE "public"."auth_role" (
                                      "mark" varchar(255) PRIMARY KEY,
                                      "name" varchar(255) COLLATE "pg_catalog"."default"
)
;

-- ----------------------------
-- Records of auth_role
-- ----------------------------
BEGIN;
INSERT INTO "public"."auth_role" ("mark", "name") VALUES ('admin', '管理员');
INSERT INTO "public"."auth_role" ("mark", "name") VALUES ('user', '普通用户');
COMMIT;

-- ----------------------------
-- Table structure for auth_role_menu
-- ----------------------------
DROP TABLE IF EXISTS "public"."auth_role_menu";
CREATE TABLE "public"."auth_role_menu" (
                                           "role_mark" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
                                           "menu_name" varchar(255) COLLATE "pg_catalog"."default" NOT NULL
)
;

-- ----------------------------
-- Records of auth_role_menu
-- ----------------------------
BEGIN;
INSERT INTO "public"."auth_role_menu" ("role_mark", "menu_name") VALUES ('admin', 'admin-system-role');
INSERT INTO "public"."auth_role_menu" ("role_mark", "menu_name") VALUES ('admin', 'admin-system-menu');
INSERT INTO "public"."auth_role_menu" ("role_mark", "menu_name") VALUES ('admin', 'admin-system-user');
INSERT INTO "public"."auth_role_menu" ("role_mark", "menu_name") VALUES ('admin', 'admin-content-document');
COMMIT;

-- ----------------------------
-- Table structure for auth_role_permission
-- ----------------------------
DROP TABLE IF EXISTS "public"."auth_role_permission";
CREATE TABLE "public"."auth_role_permission" (
                                                 "role_mark" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
                                                 "permission_mark" varchar(255) COLLATE "pg_catalog"."default" NOT NULL
)
;

-- ----------------------------
-- Records of auth_role_permission
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for auth_user
-- ----------------------------
DROP TABLE IF EXISTS "public"."auth_user";
CREATE TABLE "public"."auth_user" (
                                      "id" BIGSERIAL PRIMARY KEY,
                                      "avatar" varchar(255) COLLATE "pg_catalog"."default",
                                      "nickname" varchar(255) COLLATE "pg_catalog"."default",
                                      "username" varchar(255) COLLATE "pg_catalog"."default",
                                      "password" varchar(255) COLLATE "pg_catalog"."default",
                                      "create_time" timestamp(6),
                                      "update_time" timestamp(6)
)
;

-- ----------------------------
-- Records of auth_user
-- ----------------------------
BEGIN;
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (13, '', 'yuxl9', 'yuxl9', '$2a$10$fIX.PvaDzVbRC1WtUe/L4Oujf8u0iH4piajaDnJFeSGORH2xUJnHu', '2025-07-27 22:14:36.21494', '2025-07-27 22:14:36.21494');
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (14, '', 'yuxl10', 'yuxl10', '$2a$10$fIX.PvaDzVbRC1WtUe/L4Oujf8u0iH4piajaDnJFeSGORH2xUJnHu', '2025-07-27 22:14:36.21494', '2025-07-27 22:14:36.21494');
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (15, '', 'yuxl11', 'yuxl11', '$2a$10$fIX.PvaDzVbRC1WtUe/L4Oujf8u0iH4piajaDnJFeSGORH2xUJnHu', '2025-07-27 22:14:36.21494', '2025-07-27 22:14:36.21494');
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (16, '', 'yuxl12', 'yuxl12', '$2a$10$fIX.PvaDzVbRC1WtUe/L4Oujf8u0iH4piajaDnJFeSGORH2xUJnHu', '2025-07-27 22:14:36.21494', '2025-07-27 22:14:36.21494');
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (17, '', 'yuxl13', 'yuxl13', '$2a$10$fIX.PvaDzVbRC1WtUe/L4Oujf8u0iH4piajaDnJFeSGORH2xUJnHu', '2025-07-27 22:14:36.21494', '2025-07-27 22:14:36.21494');
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (18, '', 'yuxl14', 'yuxl14', '$2a$10$fIX.PvaDzVbRC1WtUe/L4Oujf8u0iH4piajaDnJFeSGORH2xUJnHu', '2025-07-27 22:14:36.21494', '2025-07-27 22:14:36.21494');
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (19, '', 'yuxl15', 'yuxl15', '$2a$10$fIX.PvaDzVbRC1WtUe/L4Oujf8u0iH4piajaDnJFeSGORH2xUJnHu', '2025-07-27 22:14:36.21494', '2025-07-27 22:14:36.21494');
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (20, '', 'yuxl16', 'yuxl16', '$2a$10$fIX.PvaDzVbRC1WtUe/L4Oujf8u0iH4piajaDnJFeSGORH2xUJnHu', '2025-07-27 22:14:36.21494', '2025-07-27 22:14:36.21494');
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (21, '', 'yuxl17', 'yuxl17', '$2a$10$fIX.PvaDzVbRC1WtUe/L4Oujf8u0iH4piajaDnJFeSGORH2xUJnHu', '2025-07-27 22:14:36.21494', '2025-07-27 22:14:36.21494');
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (22, 'http://127.0.0.1:9000/paopao/user/avatar/favicon.jpg', 'yuxl18', 'yuxl18', '$2a$10$fIX.PvaDzVbRC1WtUe/L4Oujf8u0iH4piajaDnJFeSGORH2xUJnHu', '2025-07-27 22:14:36.21494', '2025-08-16 02:29:01.82882');
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (23, 'http://127.0.0.1:9000/paopao/user/avatar/favicon.jpg', 'yuxl19', 'yuxl19', '$2a$10$fIX.PvaDzVbRC1WtUe/L4Oujf8u0iH4piajaDnJFeSGORH2xUJnHu', '2025-07-27 22:14:36.21494', '2025-08-16 02:36:44.25943');
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (2, 'http://127.0.0.1:9000/paopao/user/avatar/logo.png', 'user', 'user', '$2a$10$Efjw16HC7bkDPXwNR8UYgeDcKryB2E4vLTKvV5cQQOfe6v88GF/8e', '2025-07-11 00:19:27.845879', '2025-08-16 02:37:19.563541');
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (6, 'http://127.0.0.1:9000/paopao/user/avatar/user.jpg', 'yuxl3', 'yuxl2', '$2a$10$fIX.PvaDzVbRC1WtUe/L4Oujf8u0iH4piajaDnJFeSGORH2xUJnHu', '2025-07-27 22:14:36.21494', '2025-08-16 02:44:23.456373');
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (5, 'http://127.0.0.1:9000/paopao/user/avatar/xjpic.jpg', 'yuxl11111', 'yuxl11111', '$2a$10$fIX.PvaDzVbRC1WtUe/L4Oujf8u0iH4piajaDnJFeSGORH2xUJnHu', '2025-07-27 22:14:36.21494', '2025-08-16 02:47:39.26884');
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (9, 'http://127.0.0.1:9000/paopao/user/avatar/524ca66ce59b6da2f5608d2965274586.gif', 'yuxl5', 'yuxl5', '$2a$10$fIX.PvaDzVbRC1WtUe/L4Oujf8u0iH4piajaDnJFeSGORH2xUJnHu', '2025-07-27 22:14:36.21494', '2025-08-22 21:06:48.320895');
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (1, 'http://127.0.0.1:9000/paopao/user/avatar/524ca66ce59b6da2f5608d2965274586.gif', 'admin', 'admin', '$2a$10$Efjw16HC7bkDPXwNR8UYgeDcKryB2E4vLTKvV5cQQOfe6v88GF/8e', '2025-07-11 00:19:27.845879', '2025-08-22 21:07:07.15197');
INSERT INTO "public"."auth_user" ("id", "avatar", "nickname", "username", "password", "create_time", "update_time") VALUES (4, '', 'yuxl1', 'yuxl1', '$2a$10$hxYssh.MLgt46aZDSJxZTuu/a/fOfejgBok0yW3XMDPAxXFtLXUWa', '2025-07-27 22:14:22.550659', '2025-07-27 22:36:00');
COMMIT;

-- ----------------------------
-- Table structure for auth_user_role
-- ----------------------------
DROP TABLE IF EXISTS "public"."auth_user_role";
CREATE TABLE "public"."auth_user_role" (
                                           "user_id" BIGSERIAL PRIMARY KEY,
                                           "role_mark" varchar(255) COLLATE "pg_catalog"."default" NOT NULL
)
;

-- ----------------------------
-- Records of auth_user_role
-- ----------------------------
BEGIN;
INSERT INTO "public"."auth_user_role" ("user_id", "role_mark") VALUES (1, 'admin');
INSERT INTO "public"."auth_user_role" ("user_id", "role_mark") VALUES (2, 'user');
COMMIT;

-- ----------------------------
-- Table structure for content_document
-- ----------------------------
DROP TABLE IF EXISTS "public"."content_document";
CREATE TABLE "public"."content_document" (
                                             "id" BIGSERIAL PRIMARY KEY,
                                             "title" varchar(255) COLLATE "pg_catalog"."default",
                                             "path" varchar(255) COLLATE "pg_catalog"."default",
                                             "description" text COLLATE "pg_catalog"."default",
                                             "text" text COLLATE "pg_catalog"."default",
                                             "create_by" int8,
                                             "update_by" int8,
                                             "create_time" timestamp(6),
                                             "update_time" timestamp(6)

)
;

-- ----------------------------
-- Records of content_document
-- ----------------------------
BEGIN;
COMMIT;
